<template>
  <router-link tag="div" :to="path" id="my-playlist">
    <div class="img-box">
      <img :src="imgurl" alt="" />
    </div>
    <div class="title-box">
      <p>{{ title }}</p>
      <p>{{ info }}</p>
    </div>
  </router-link>
</template>

<script>
import defaultImg from '@/assets/images/paylist.jpg';
export default {
  props: {
    path:{
      type:String,
      default:''
    },
    imgurl: {
      type: String,
      default: defaultImg,
    },
    title: {
      type: String,
      default: '',
    },
    info: {
      type: String,
      default: '',
    },
  },
};
</script>

<style lang="scss" scoped>
#my-playlist {
  display: flex;
  justify-content: space-around;
  padding: 10px 12px;
  .img-box {
    width: 40px;
    height: 40px;
    img {
      width: 100%;
      height: 100%;
      vertical-align: middle;
    }
  }
  .title-box {
    flex: 1;
    line-height: 20px;
    overflow: hidden;
    text-overflow: ellipsis;
    & > p:nth-child(1) {
      font-size: 13px;
      color: #fff;
    }
    & > p:nth-child(2) {
      font-size: 12px;
      color: #888;
    }
  }
}
</style>
